<?php
if (isset($location))
    Yii::app()->clientScript->registerScript('list', <<<DOCHERE

   var custno= '$location->custno';
   var locno='$location->locno';
DOCHERE
        , CClientScript::POS_BEGIN);
else {
    Yii::app()->clientScript->registerScript('list', <<<DOCHERE

   var custno= '$customer->custno';
   var locno=-1;
DOCHERE
        , CClientScript::POS_BEGIN);

}
?>
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/app/customerPortal/dispatches.js', CClientScript::POS_END); ?>
<div id="left-col">

    <?php
    if (isset($location))
        $this->renderPartial('_side', array(
            'location' => $location,
            'customer' => $customer
        ));
    else {
        $this->renderPartial('_side', array(

            'customer' => $customer
        ));
    }
    ?>


</div>

<div id="right-col">

    <div class="wrap">
        <div class="container">


            <div id="breadcrumb" style="display:none;"><span style="padding-left:10px;font-size:10px;color:#777777;"
                                                             id="alsoviewing"></span></div>
            <div class="inside">

                <?php
                if (isset($location))
                    $this->renderPartial('/locations/_view', array(
                        'location' => $location,
                    )); else {
                    $this->renderPartial('_view', array(
                        'customer' => $customer,
                        'type' => $type,
                        'complete' => $complete
                    ));
                }
                ?>

                <?php
                if (isset($location))
                    $this->renderPartial('/locations/_tab', array(
                        'model' => $location,
                    ));
                ?>
                <br/>


                <div id="dispatch-list">

                </div>

            </div>
            <!-- inside -->
        </div>
        <!-- container -->
    </div>
    <!-- wrap -->
    <?php $this->renderPartial('application.views.copyright'); ?>
</div> <!-- left-col -->